package com.epoint.mobileoa.personalized.epointcompany.ui.gzrz.task;

import java.util.Map;

import android.os.Message;

import com.epoint.mobileoa.R;
import com.epoint.mobileoa.bizlogic.SuperView;
import com.epoint.mobileoa.bizlogic.Task;
import com.epoint.mobileoa.db.DBHelp;
import com.epoint.mobileoa.tools.WebServiceUtilDAL;

/**
 * @author liyc
 * @time 2012-9-5 下午6:30:31
 * @annotation 审核退回
 */
public class RZReturnClickTask extends Task {

	/**
	 * @param con
	 * @param param
	 */
	public RZReturnClickTask(SuperView con, Map<String, Object> param) {
		super(con, param);
	}

	@Override
	public void exectue(Message mess) throws Exception {
		String RZDate = getParam().get("RZDate").toString();
		String CheckedUserGuid = getParam().get("CheckedUserGuid").toString();
		String RtnReason = getParam().get("RtnReason").toString();
		String CurrentUserName = getFP().getDisplayname();
		String CurrentUserGuid = getFP().getUserguid();
		String CurrentOuGuid = DBHelp.getUserOuguid(getCon(), CurrentUserGuid);
		
		String url = getCon().getString(R.string.epointcompany_rizhi_url);
		String namespace = getCon().getString(R.string.epointcompany_rizhi_namespace);
		String method = "RZReturnClick";
		WebServiceUtilDAL webservice = new WebServiceUtilDAL(url,
				method, namespace);
		webservice.addProperty("RZDate", RZDate);
		webservice.addProperty("CheckedUserGuid", CheckedUserGuid);
		webservice.addProperty("RtnReason", RtnReason);
		webservice.addProperty("CurrentUserName", CurrentUserName);
		webservice.addProperty("CurrentUserGuid", CurrentUserGuid);
		webservice.addProperty("CurrentOuGuid", CurrentOuGuid);
		
		String bs = webservice.start();
		setMessageToRefreshUI(mess, getCon(), bs);
	}

}
